package org.chiv.gof.singleton;

/**
 * 饿汉 单例模式
 */
public class Hungryton {
    //类一旦加载就创建一个单例
    private static final Hungryton hungryton = new Hungryton();

    //private 避免类在外部被实例化
    private Hungryton() {
    }

    public static Hungryton getInstance() {
        return hungryton;
    }
}
